$OpenBSD: patch-xcept_makefile,v 1.1 2000/09/03 16:25:05 espie Exp $
--- xcept/makefile.orig	Fri May 13 12:19:55 1994
+++ xcept/makefile	Sun Sep  3 17:41:23 2000
@@ -48,24 +48,25 @@ SERVERPORT = 20005
 #   should be displayed in the scripts menu. (Only used when not
 #   overridden by enironment variable XCEPTSCRIPTS or by command line
 #   option '-S').
-SCRIPTSDIR = /usr/local/btx
+SCRIPTSDIR = ${PREFIX}/lib/xcept
 
 
 #define compiler and X11 include+library pathes 
-CC	= gcc
-XINC	= -I/usr/X386/include
-XLIB	= -L/usr/X386/lib
+#CC	= gcc
+XINC	= -I${X11BASE}/include
+XLIB	= -L${X11BASE}/lib
 #WARN	= -W -Wunused -Wswitch -Wcomment -Wshadow -Wpointer-arith -Wcast-qual
 
 
 #define location of the xcept binary and online manual (for 'make install').
 OWNER	= bin
-GROUP	= uucp
-MODE	= 755
-BINDIR	= /usr/local/bin
-MANDIR	= /usr/local/man/manl
-
+GROUP	= bin
+BINMODE	= 755
+BINDIR	= ${PREFIX}/bin
+MANDIR	= ${PREFIX}/man/man1
+MANMODE = 644
 
+MANPAGE = xcept.1
 
 
 ######### definitions below should not need to be modified ###############
@@ -73,7 +74,7 @@ MANDIR	= /usr/local/man/manl
 DEFS	= -DDEFAULTCEPTHOSTNAME=\"$(SERVERHOST)\"      \
 	  -DDEFAULTSOCKETPORT=$(SERVERPORT)           \
 	  -DXCEPTSCRIPTS_DEFAULTPATH=\"$(SCRIPTSDIR)\"		
-CFLAGS	= $(XINC) $(WARN) $(DEFS)
+CFLAGS	+= $(XINC) $(WARN) $(DEFS)
 
 
 SRCS = 	xcept.c xfont.c rawfont.c xwin.c layer6.c socket.c buttons.c \
@@ -84,34 +85,26 @@ OBJS =	xcept.o xfont.o rawfont.o xwin.o 
 
 
 
-all:		xcept
+all:		xcept ${MANPAGE}
 
 xcept:		$(OBJS)
-		@echo 'linking $@'
-		@$(CC) $(OBJS) -o xcept $(XLIB) -lX11 -lnsl -lsocket /usr/ucblib/libucb.a
+		$(CC) $(OBJS) -o xcept $(XLIB) -lX11
 
 $(OBJS):
-		@echo 'compiling $*.c'
-		@$(CC) $(CFLAGS) -c $*.c
+		$(CC) $(CFLAGS) -c $*.c
 
 
 tags:		$(SRCS)
 		etags -e $(SRCS)
 
-install:	xcept
-		strip xcept
-		mv xcept $(BINDIR)
-		-chown $(OWNER) $(BINDIR)/xcept
-		-chgrp $(GROUP) $(BINDIR)/xcept
-		chmod $(MODE)   $(BINDIR)/xcept
-		cp xcept.1 $(MANDIR)
-		-chown $(OWNER) $(MANDIR)/xcept.1
-		-chgrp $(GROUP) $(MANDIR)/xcept.1
-		chmod 644       $(MANDIR)/xcept.1
-
+install:	all
+		${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${BINMODE} xcept\
+		${BINDIR}/xcept
+		${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${MANMODE}\
+		${MANPAGE} ${MANDIR}/${MANPAGE}
 
 clean:
-		@rm -f $(OBJS) xcept
+		@rm -f $(OBJS) xcept ${MANCLEAN}
 
 
 
